1. Field of the Invention
The present invention relates to an image processing apparatus, and a image acquisition apparatus for providing a range image based on an image group acquired by a camera array image capturing device.
2. Description of the Related Art
Conventionally, there is a distance measurement apparatus which measures a distance between an object and a camera on the basis of a plurality of images which are captured from different viewpoints by using a plurality of optical systems. As a method for measuring a distance between an object and a camera, a stereo matching process which is based on a correlation between images and which uses a plurality of images having parallax that are captured by a stereo camera, is known. Further, Japanese Patent Laid-Open No. 2008-196891 discloses a camera array stereo matching process which measures a distance using three or more images captured from different viewpoints in order to improve distance measurement accuracy.
As another distance measuring method, a method for measuring a distance between a main object and a camera by a so-called contrast method which measures the distance on the basis of a plurality of object images captured by shifting the focus position is known. A method for measuring a distance between a main object and a camera, which is extended from the above method to a camera array method including a plurality of optical systems, is disclosed by Japanese Patent Laid-Open No. 2009-216600. In this method, a distance to the main object is measured by the contrast method based on a plurality of object images captured by an image capturing apparatus including a plurality of optical systems having different focus positions. Compared with a method for acquiring a plurality of object images while changing the focus position by using a single-view image capturing apparatus, the method of Patent Document 2 using the camera array method has an advantage that a plurality of object images having different focus positions can be acquired by one-time image capturing.
However, the method proposed by Japanese Patent Laid-Open No. 2008-196891 has problems that (1) the resolution of a distance map decreases in an image area different from the focus position and (2) the accuracy of distance estimation degrades when the depth of field is increased. Regarding the former problem, although a substantially focused image is obtained by driving a lens to adjust the focus position when the object is located at a distant place, when the object is located at a nearby place, the image is out of focus and an image with a low resolution is captured. If a distance is measured based on such an image out of focus, the resolution of an obtained range image decreases. Regarding the latter problem, although it can be considered to reduce the lens diameter to increase the depth of field of the image capturing system and capture a all-focused image, if the lens diameter is reduced, the amount of incident light to the lens decreases and noise included in a captured image increases. If a distance is measured based on an image including a lot of noise, there is a problem that the accuracy of distance estimation degrades.
The method proposed by Japanese Patent Laid-Open No. 2009-216600 is limited to measurement of distance to the main object, and if there is a background in a position different from the main object, there is a problem that distance measurement of an entire image including the main object and the background cannot be realized.